.amplify-fieldset {
  background-color: var(--amplify-components-fieldset-background-color);
  border-radius: var(--amplify-components-fieldset-border-radius);
  flex-direction: var(--amplify-components-fieldset-flex-direction);
  gap: var(--amplify-components-fieldset-gap);
  /* Sizes */
  &--small {
    gap: var(--amplify-components-fieldset-small-gap);
  }
  &--large {
    gap: var(--amplify-components-fieldset-large-gap);
  }
  /* Variations */
  &--outlined {
    border: var(--amplify-components-fieldset-outlined-border-width)
      var(--amplify-components-fieldset-outlined-border-style)
      var(--amplify-components-fieldset-outlined-border-color);
    padding: var(--amplify-components-fieldset-outlined-padding);
    &.amplify-fieldset--small {
      padding: var(--amplify-components-fieldset-outlined-small-padding);
    }
    &.amplify-fieldset--large {
      padding: var(--amplify-components-fieldset-outlined-large-padding);
    }
  }
}

.amplify-fieldset__legend {
  color: var(--amplify-components-fieldset-legend-color);
  font-weight: var(--amplify-components-fieldset-legend-font-weight);
  line-height: var(--amplify-components-fieldset-legend-line-height);
  font-size: var(--amplify-components-fieldset-legend-font-size);
  &--small {
    font-size: var(--amplify-components-fieldset-legend-small-font-size);
  }
  &--large {
    font-size: var(--amplify-components-fieldset-legend-large-font-size);
  }
}
